package com.yanqu.road.server.cmd.player;

import com.yanqu.road.pb.player.BlacklistProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.utils.YanQuMessageUtils;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameProtocol;

/**
 * @author ：zfr
 * @date ：2021/4/6 18:27
 */
@Cmd(code = CrossProtocol.C_CROSS_ADD_BLACK_LIST_GET_USER_INFO_RESP, desc = "拉黑到跨服获取玩家信息")
public class CrossAddBlackListRespCmd extends CrossCommand {
    private BlacklistProto.BlacklistAddCrossRespMsg msg;
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        msg = BlacklistProto.BlacklistAddCrossRespMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        YanQuMessage message = YanQuMessageUtils.buildMessage(GameProtocol.S_BLACKLIST_GET_USER_INFO_CROSS_RESP, msg);
        MessageHelper.sendPacket(msg.getFromUserServerId(), msg.getFromUserId(), message);

    }

    @Override
    public void sendData() {

    }
}
